#include #include #include #include using namespace std; void main() { //ofstream fout("junk.txt"); //fout << "This is a test" << endl; //fout << "This is a test" << 234 << endl; //fout << "This is a test" << endl; //fout.close(); //ofstream fout2("junk.psv"); //fout2 << "appple.orange.grape" << endl; //fout2 << "2.3.4" << endl; //fout2 << "asdf.orsdfange.asdfas" << endl; //fout2.close(); ifstream fin("bible.txt"); string s; while(!fin.eof()) { getline(fin,s); if(s.find("Bathsheba") != string::npos) { cout << s << endl; } } fin.close(); ofstream fout("Source.cpp",ios_base::app); //append to the file fout << "//this is a new comment \n"; fout.close(); } //void main() //{ // ostringstream sout; // // float f; // cin >> f; // // sout.precision(2); // sout.setf(ios_base::fixed); // // sout << 1 << " " << f << " " << "test"; // cout << sout.str() << endl; //str() gets a string from the stringstream // cout << sout.str() << endl; //str() gets a string from the stringstream // // string s = "1 2 3 4"; // istringstream sin(s); // int i; // while(!sin.eof()) //end of file // { // sin >> i; // cout << i << endl; // } // //sin >> i; // //cout << i << endl; // //sin >> i; // //cout << i << endl; // //sin >> i; // //cout << i << endl; // // //} //this is a new comment //this is a new comment